home *** CD-ROM | disk | FTP | other *** search
- PROGRAM graphtest(input,output);
-
- {$I graphics.lib}
-
- var
- i,j : integer;
- ch : char;
-
- procedure doboxes;
- var
- x1,y1,x2,y2,x : integer;
- begin
- for x := 1 to 20 do begin
- x1 := random(500);
- y1 := random(150);
- x2 := random(630);
- y2 := random(220);
- drawbox(x1,y1,x2,y2,white);
- end;
- end;
-
- BEGIN { bitmap }
- graphon;
-
- write(chr(27),'x1');
-
- drawline(50,100,100,200,white);
- drawline(50,200,100,100,white);
-
- drawbox(50,100,100,200,white);
- for i := 1 to 49 do drawbox(50+i,100+i,100-i,200-i,white);
-
- drawcircle(400,100,100,white,1.0);
- for i := 1 to 50 do drawcircle(random(640),random(224),random(100),random(6)+1,1.0);
-
- GotoXY(60,2);
- write('Done ');
- read(kbd,ch);
- clrscr;
- randomize;
- doboxes;
- gotoxy(60,2);
- write('Done ');
- read(kbd,ch);
- graphoff;
- write(chr(27),'y1');
- END.